import java.io.*;
import java.util.Vector;

import Visitors.PrettyPrinter;

import AST.ASTProgram;

public class main 
{

	/**
	 * @param args
	 */
	public static void main(String[] args) 
	{
		Lexer lex = new Lexer();
		/*Lexeme lexem = lex.Next();
		while (lexem._token != Token.Token_EOF)
		{
			System.out.println(lexem._token + "|" + lexem._value);
			lexem = lex.Next();
		}*/
		Parser pars = new Parser(lex);

		//ASTProgram program  = new ASTProgram();
		System.out.println("---Parsing---");
		ASTProgram program = pars.ParseProgram();
		System.out.println("---PrettyPrinter---");
		if (program == null)
		{
			System.out.println("I've got a problem here.");
		}
		else
		{
			System.out.println("Ok");
		}
		PrettyPrinter printer = new PrettyPrinter();
		program.Accept(printer);
		
		//printer.visit(program);
	}
}
